/*****************************************************************************
Copyright 2006 Kervin L. Pierre
    EMAIL: otlkcon@adevsoft.com

This file is part of Otlkcon.

Otlkcon is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.

Otlkcon is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Lesser GNU General Public License for more details.

You should have received a copy of the Lesser GNU General Public License
along with Otlkcon; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

*******************************************************************************/

#include "stdafx.h"
#include "file.h"
#include <strsafe.h>
#include <otlkcon_config.h>

FileComponent::FileComponent()
{
    status = 0;
}

FileConnection::FileConnection()
{
    //Default 5 minutes
    pollSecs = 300;

    loggedOn = FALSE;

    user = pass = uri = L"";

    pXMLHttpReq = NULL;
}

HRESULT FileConnection::Init(wstring idStr)
{
    HRESULT result = S_OK;

    // For uniquely identifying the connection
    // in the local system.
    id = idStr;

    return result;
}

HRESULT FileConnection::Logon(wstring u, wstring us, wstring p )
{
    HRESULT result = S_OK;

    return S_OK;
}

HRESULT FileConnection::PutNewComponent( icalcomponent *comp )
{
    HRESULT result = S_OK;

    return result;
}

HRESULT FileConnection::GetAllEventNames( map<wstring,wstring> *namePairs )
{
    HRESULT result = S_OK;


    return result;
}

HRESULT FileConnection::GetEventsByName( list<wstring> names,
                           list<FileComponent *> *comps)
{
    HRESULT result = S_OK;

    return result;
}

HRESULT FileConnection::DeleteResource( wstring name )
{
    HRESULT result = S_OK;

    return result;
}

HRESULT FileConnection::GetEventsByRange( 
                                 struct icaltimetype tm_start,
                                 struct icaltimetype tm_end,
                                 list<FileComponent *> *comps )
{
    HRESULT result = S_OK;

    return result;
}
